<%@ include file="/WEB-INF/jsp/includes/include.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>NoAssertions.com</title>
	<link rel="stylesheet" href="<fmt:message bundle="${mess}" key="baseUrl" />css/reset.css" />
	<link rel="stylesheet" href="<fmt:message bundle="${mess}" key="baseUrl" />css/text.css" />
	<link rel="stylesheet" href="<fmt:message bundle="${mess}" key="baseUrl" />css/960.css" />
	<link rel="stylesheet" href="<fmt:message bundle="${mess}" key="baseUrl" />css/nastyle.css" />
</head>
<%@ include file="/WEB-INF/jsp/includes/bodyheader.jsp"%>

		<!--  start center section -->
		<div id="centerSection" class="grid_12">	
			<div class="grid_2 alpha">
				<img src="<fmt:message bundle="${mess}" key="baseUrl" />img/spacer.gif"/>			
			</div>
			<div class="grid_8">
				<h2>Similar Fits</h2>
				<p>You can find similar fits in two different ways:</p>
				
				<p><b>1. Find fits that are closest to the below fit as a whole. This type of search will find the closest matches using all measurement points.</b></p>
				<div class="indent3">
	  				<form name="commentForm" method="post" action="<fmt:message bundle="${mess}" key="servletUrl" />similar/fit/${fit.fitid}">			
					<ul>
						<li>Date of Fit: <span id="dateofmeasurement"><fmt:formatDate  value="${fit.dateofmeasurement}" type="date" dateStyle="full" pattern="yyyy-MM-dd"/></span></li>
						<li>Saddle Height: <span id="saddleheight">${fit.saddleheight}</span></li>
						<li>Center to Bars: <span id="centertobars">${fit.centertobars}</span></li>
						<li>Center to Saddle: <span id="centertosaddle">${fit.centertosaddle}</span></li>
						<li>Floor to Saddle: <span id="floortosaddle">${fit.floortosaddle}</span></li>
						<li>Floor to Bars: <span id="floortobars">${fit.floortobars}</span></li>
						<li>Bar Width: <span id="barswidth">${fit.barswidth}</span></li>					
						<c:choose>
							<c:when test="${empty fit.notes}">
							<li>Notes: No notes associated with this fit</li>
				          </c:when>
				          <c:otherwise>
							<li>Notes: <span id="notes">${fit.notes}</span></li>
				          </c:otherwise>
				        </c:choose>	
						<li><span class="hidden" id="fitid">${fit.fitid}</span></li>
					</ul>
						<input type="submit" value="Find Similar Fits">
					</form>	
				</div>
				<p><b>2. Find fits by specifying fit point ranges. This type of search will find fits whose contact points fall in the ranges you specify.</b></p>
				<div class="indent3">
	  				<form name="rangeFit" method="post" action="<fmt:message bundle="${mess}" key="servletUrl" />similar/fit/range">	
							<p>Click the checkbox if you want the value to be considered in the search. Ranges provides are 1.5% below and 1.5% above original measurement.</p>
							<div><span class="col1"><input type="checkbox" name="saddleheight" value="saddleheight"/> Saddle Height:</span><input type="text" name="lsaddleheight" size="5" value="${lrangefit.saddleheight}"><input type="text" name="usaddleheight" size="5" value="${urangefit.saddleheight}"></div>
							<div><span class="col1"><input type="checkbox" name="centertobars" value="centertobars"/>  Center to Bars:</span><input type="text" name="lcentertobars" size="5" value="${lrangefit.centertobars}"><input type="text" name="ucentertobars" size="5" value="${urangefit.centertobars}"></div>
							<div><span class="col1"><input type="checkbox" name="centertosaddle" value="centertosaddle"/>  Center to Saddle:</span><input type="text" name="lcentertosaddle" size="5" value="${lrangefit.centertosaddle}"><input type="text" name="ucentertosaddle" size="5" value="${urangefit.centertosaddle}"></div>
							<div><span class="col1"><input type="checkbox" name="floortosaddle" value="floortosaddle"/> Floor to Saddle:</span><input type="text" name="lfloortosaddle" size="5" value="${lrangefit.floortosaddle}"><input type="text" name="ufloortosaddle" size="5" value="${urangefit.floortosaddle}"></div>
							<div><span class="col1"><input type="checkbox" name="floortobars" value="floortobars"/> Floor to Bars:</span><input type="text" name="lfloortobars" size="5" value="${lrangefit.floortobars}"><input type="text" name="ufloortobars" size="5" value="${urangefit.floortobars}"></div>
							<div><span class="col1"><input type="checkbox" name="barswidth" value="barswidth"/> Bar Width:</span><input type="text" name="lbarswidth" size="5" value="${lrangefit.barswidth}"><input type="text" name="ubarswidth" size="5" value="${urangefit.barswidth}"></div>
						<span class="hidden">
							<input id="bread" type="text" size="10" name="bread" />
						</span>
						<div class="submit">						
							<input type="submit" value="Find Similar Fits">
						</div>
					</form>
				</div>
			</div>
			<div class="grid_2 omega">	    
			</div>
		</div>
		<div class="clear"></div>
		<!--  end center section -->
<%@ include file="/WEB-INF/jsp/includes/footer.jsp"%>